var e = require;
var t = module;
var o = exports;
Object.defineProperty(o, "__esModule", {value: !0});
var n = e("BaseModuleUI"),
    a = e("GlobalParams"),
    i = e("AudioManager"),
    r = e("FightViewUI"),
    s = cc._decorator,
    l = s.ccclass,
    c = s.property,
    d = (function (e) {
        function t() {
            var t = (null !== e && e.apply(this, arguments)) || this;
            return (t.guide_info_view = []), (t.continue_btn = null), (t.guide_index = 0), t;
        }
        return (
            __extends(t, e),
            (t.prototype.initView = function () {
                (this.guide_index = 0), this.showGuideInfo(), this.continue_btn.on("click", this.showNextGuide, this);
            }),
            (t.prototype.showGuideInfo = function () {
                var e = this;
                this.continue_btn.active = !1;
                for (var t = 0; t < this.guide_info_view.length; t++)
                    this.guide_info_view[t].active = t == this.guide_index;
                2 == this.guide_index && i.default.getInstance().playFx("guide_8"),
                    this.scheduleOnce(function () {
                        e.continue_btn.active = !0;
                    }, 2);
            }),
            (t.prototype.showNextGuide = function () {
                this.guide_index++,
                    this.guide_index >= this.guide_info_view.length
                        ? ((a.GlobalParams.JoinGuideMode.value = !1),
                          cc.find("Canvas/FightViewUI").getComponent(r.default).gameStart(),
                          this.node.parent.destroy())
                        : this.showGuideInfo();
            }),
            __decorate([c(cc.Node)], t.prototype, "guide_info_view", void 0),
            __decorate([c(cc.Node)], t.prototype, "continue_btn", void 0),
            __decorate([l], t)
        );
    })(n.default);
o.default = d;
